home *** CD-ROM | disk | FTP | other *** search
- rem
- rem ****************
- rem * TESTCGI.BAT *
- rem ****************
- rem
- rem Test script for use with CGI example document included
- rem with server documentation. Blank line REQUIRED after
- rem Content-type header!
- rem
- rem Windows 95 flavor, brain-dead COMMAND.COM
- rem WARNING: Angle brackets are significant in REM statements!
- rem
- rem Bob Denny rdenny@netcom.com
- rem 20-Feb-95
- rem
- rem Echo is OFF at script entry. Don't use 'exit' or you'll defeat the
- rem shell hang for debugging.
- rem
- if "%os%"=="Windows_NT" goto oops
- set of=%output_file%
- echo Content-type: text/plain > %of%
- echo. >> %of%
- echo CGI/1.2 (Windows 95) test script report: >> %of%
- echo. >> %of%
- echo ----------------------- >> %of%
- echo Command line arguments: >> %of%
- echo ----------------------- >> %of%
- echo. >> %of%
- if "%1"=="" goto CONT1
- echo %1 %2 %3 %4 %5 %6 %7 %8 >> %of%
- goto CONT2
- :CONT1
- echo (none) >> %of%
- :CONT2
- echo. >> %of%
- echo ---------------------- >> %of%
- echo Environment variables: >> %of%
- echo ---------------------- >> %of%
- set >> %of%
- echo. >> %of%
- echo ------------- >> %of%
- echo Accept types: >> %of%
- echo ------------- >> %of%
- type %HTTP_ACCEPT% >> %of%
- echo. >> %of%
- if NOT "%REQUEST_METHOD%"=="POST" goto nocont
- echo ----------------- >> %of%
- echo Content for POST: >> %of%
- echo ----------------- >> %of%
- type %CONTENT_FILE% >> %of%
- echo. >> %of%
- :nocont
- echo -- end of report -- >> %of%
- goto finish
- :oops
- rem In case run under NT
- echo Content-type: text/plain
- echo.
- echo Wrong script for NT. Use testcgi.cmd
- :finish
-
-
-